ExitRepeat
ExitRepeat
 
Parameters: NONE
Returns: NONE
 

     ExitRepeat will force PlayBASIC to break out of the current Repeat-Until loop that is being executed.



FACTS:


      * Only works within Repeat-Until loops.

      * When an ExitRepeat command is executed, PlayBASIC will continue the program code following the Until statement.




Mini Tutorial:


      Breaking free of Repeat-Until when a condition is met.

  
; a simple Repeat-Until loop
  Repeat
     Inc i
     Print i
     
   ; Exit the For-Next loop if i equals 9
     If i = 9 Then ExitRepeat
  Until i = 100
  
  Print "This program has ended.."
  
; display the screen and wait for a key to be pressed
  Sync
  WaitKey
  
  



This example would output.

  
  0
  1
  2
  3
  4
  5
  6
  7
  8
  9
  This program has ended..
  

 
Related Info: Continue | Do | Exit | For | Loops | Repeat | While :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com